package com.javaai.project.ai;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

// AI智能家医助手
@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT,
        //chatModel = "qwenChatModel",
        streamingChatModel = "qwenStreamingChatModel",
        chatMemoryProvider = "chatMemoryProviderDoctor",
        tools = "doctorAssistantTools",
        contentRetriever = "contentRetrieverDoctor" // 使用已存在的contentRetrieverDoctor替代contentRetrieverDoctorPincone
)
public interface DoctorAssistant {
    // 流式输出
    @SystemMessage(fromResource = "doctor-prompt-template.txt")
    Flux<String> streamChat(@MemoryId Long memoryId, @UserMessage String userMessage);
}